package thread;

/**
 * Created with IntelliJ IDEA
 * Description：lambda表达式
 * User：chenshu
 * Date：2023-11-01
 * Time：14:26
 */
public class Demo5 {
    public static void main(String[] args) {
        Thread t = new Thread(()->{
           while (true) {
               System.out.println("hello thread");
               try {
                   Thread.sleep(1000);
               } catch (InterruptedException e) {
                   throw new RuntimeException(e);
               }
           }
        });
        t.start();
    }
}
